<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<form class="form-horizontal" role="form" id="form">

</form>

<script type="text/javascript" src="../lib/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../lib/layer/layer.js"></script>

<script type="text/javascript" src="../lib/handlebars/handlebars-v4.0.5.js"></script>
<script type="text/javascript" src="../lib/handlebars/handlebars-extend.js"></script>

<link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script type="text/javascript" src="../lib/bootstrap/js/bootstrap.min.js"></script>

<link rel="stylesheet" href="/lib/lobibox/css/Lobibox.min.css">
<script type="text/javascript" src="/lib/lobibox/js/lobibox.min.js"></script>
<script type="text/javascript">
    Lobibox.notify.DEFAULTS.soundPath="/lib/lobibox/sounds/";
</script>

<script type="text/javascript"  src="../lib/common/common.js"></script>

<link type="text/css" href="../lib/component/css/cc.css" rel="stylesheet" />
<script type="text/javascript"  src="../lib/component/js/cc.js"></script>

<script type="text/javascript">
   $(function(){
       _$.parser.parse();
   })
   _$.parser.onComplete = function() {
       logger("------初始化页面完成---------");
       test();
   };

   function test(){

       dataSync1();
   }

   function dataSync1(){
       var params = {
           "num":10
       };

       var success = function(result){
           var state = result.getState();
           var info = result.getInfo();
           if(state == 0){
               var num = result.get("num");
               return num;
           }else{
              _$.notify.error(info);
           }
           return 0;
       };

       var route = {
           "apiServer":"base",
           "call":"contrast" + ".checkRepeated",
           "description":"检查重复"
       };

       var options = {
           url: "/base/data11",
           data:params,
           "route":route,
           callback:success
       };
       var num =  $.cc.ajaxDtoRequestSyncCommon(options);
   }
/*
    function data1(){
        var params = {
            "num":10
        };

        var success = function(result){
            var state = result.getState();
            var info = result.getInfo();
            if(state == 0){
                var num = result.get("num");
                console.log("data1 : " + num)
            }else{
                $.cc.error(info);
            }
        };
        var inParams = new JSonDtoModel();
        inParams.setParams(params);
        var options = {
            url: "/base/data1",
            data:params,
            successHandler:success
        };
       return $.cc.ajaxDtoRequest(inParams,options);
    }


   function data2(){
       var params = {
           "num":15
       };

       var success = function(result){
           var state = result.getState();
           var info = result.getInfo();
           if(state == 0){
               var num = result.get("num");
               var num = result.get("num");
               console.log("data2 : " + num)
           }else{
               $.cc.error(info);
           }
       };
       var inParams = new JSonDtoModel();
       inParams.setParams(params);
       var options = {
           url: "/base/data2",
           data:params,
           successHandler:success
       };
       return $.cc.ajaxDtoRequest(inParams,options);
   }*/
</script>
</body>
</html>
